# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kdesignerplugin
pkgver=5.73.0
pkgrel=0
pkgdesc="Integration of Frameworks widgets in Qt Designer/Creator"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only"
depends_dev="kcoreaddons-dev kconfig-dev kcompletion-dev kconfigwidgets-dev kiconthemes-dev kio-dev kitemviews-dev kplotting-dev ktextwidgets-dev kwidgetsaddons-dev kxmlgui-dev sonnet-dev"
makedepends="$depends_dev extra-cmake-modules qt5-qttools-dev kdoctools-dev"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/portingAids/kdesignerplugin-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="5ded7036a14ada32dd46153ad8a5867a49fb212841d8a57fc58ed152b75e1541a12b905f95a925fcda0479cdd70963b04a9cc3e1c79b3fda8276eb33f0978d28  kdesignerplugin-5.73.0.tar.xz"
